package edu.cmu.vlis.datamining.core;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class Vertex1 implements Serializable {
    int vertNum;
    Integer vertexId;
    String blogUrl;
     
    
    Map<Vertex1,List<Feature>> features;
    
    public Vertex1(int num) {
        this.vertNum = num;    
    }
   
    public Vertex1(int uniqid,Integer num) {
        this.vertNum = uniqid;    
        this.vertexId =num;
    }
    
    public int getVertNum() {
        return this.vertNum;
    }
    
    
    public Integer getVertexId() {
        return this.vertexId;
    }
    
/*    public String getSupplementaryUrl() {
        return this.supplementaryUrl;
    }
    
    public String getVertexUrl() {
        return this.vertexUrl;
    }
    
    public String getBlogPostTitle() {
        return this.blogPostTitle;
    }
    
    public  String getWebLogTitle() {
        return this.webLogTitle;
    }
    public String getAuthorName() {
        return this.authorName;
    }
    
    public Date getDatePosted() {
        return this.datePosted;
    }
    
    public  void setBlogPostTitle(String blogPostTitle) {
        this.blogPostTitle = blogPostTitle;
    }
    
    public  void setWebLogTitle(String webLogTitle) {
        this.webLogTitle = webLogTitle;
    }
    public void  setAuthorName(String authorName) {
        this.authorName = authorName;
    }
    
    public void setDatePosted(Date datePosted) {
        this.datePosted = datePosted;
    }
    
    public void setType(String type) {
        this.type = type;
    }
    
    public void setSupplementaryUrl(String site) {
        this.supplementaryUrl= site;
    }

     (non-Javadoc)
     * @see java.lang.Object#hashCode()
     
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result
                + ((authorName == null) ? 0 : authorName.hashCode());
        result = prime * result
                + ((blogPostTitle == null) ? 0 : blogPostTitle.hashCode());
        result = prime * result + ((vertexUrl == null) ? 0 : vertexUrl.hashCode());
        result = prime * result
                + ((datePosted == null) ? 0 : datePosted.hashCode());
        result = prime * result + ((supplementaryUrl == null) ? 0 : supplementaryUrl.hashCode());
        result = prime * result + ((type == null) ? 0 : type.hashCode());
        result = prime * result
                + ((vertexId == null) ? 0 : vertexId.hashCode());
        result = prime * result
                + ((webLogTitle == null) ? 0 : webLogTitle.hashCode());
        return result;
    }*/

    /* (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {

        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof Vertex1))
            return false;
        Vertex1 other = (Vertex1) obj;
        if (vertNum == 0) {
            if (other.vertNum != 0)
                return false;
    } else if (vertNum!=other.vertNum)
            return false;
        return true;
    }

    /**
     * @return the features
     */
    public Map<Vertex1, List<Feature>> getFeatures() {
        return features;
    }

    /**
     * @param features the features to set
     */
    public void setFeatures(Vertex1 neighbor, List<Feature> features) {
        this.features.put(neighbor,features);
    }
    
    public void setFeature(Vertex1 neighbor, Feature f){
        
    }

}
